import request from '@/utils/request'

// 查询商品分类表
export function findList(data) {
  return request({
    url: '/product/attributeCategory/findList',
    method: 'post',
    data
  })
}

export function fetchList(params) {
  return request({
    url:'product/attributeCategory/list',
    method:'get',
    params:params
  })
}


export function deleteAttributeCategory(data) {
  return request({
    url: '/product/attributeCategory/delete',
    method: 'post',
    data
  })
}


export function addAttributeCategory(data) {
  return request({
    url: '/product/attributeCategory/add',
    method: 'post',
    data
  })
}

export function updateAttributeCategory(data) {
  return request({
    url: '/product/attributeCategory/update',
    method: 'post',
    data
  })
}

export function findAttributeList(data) {
  return request({
    url: '/product/productAttribute/findList',
    method: 'post',
    data
  })
}
// 删除商品属性表
export function deleteProductAttr(data) {
  return request({
    url: '/product/productAttribute/delete',
    method: 'post',
    data
  })
}

export function addProductAttr(data) {
  return request({
    url: '/product/productAttribute/add',
    method: 'post',
    data
  })
}


export function findById(id) {
  return request({
    url: `/product/productAttribute/findById?id=${id}`,
    method: 'post',
  })
}
